<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/jsp/manage/common/taglibs.jsp" %>
<div class="body" style="position: relative">
    <div style="position: absolute;left: 20px;top:10px ; width: 70px; text-align: center;color: #47a6f5;cursor:pointer;border: 1px solid  #47a6f5;line-height: 28px"
         onclick="manage_sys_opens('中心机房','/manage/demo/powerPage/tosecondaryPages.html')">返回</div>
<div class="container"><div class="EMStop1"></div></div>
<div class="container1">
    <div class="EMSUspContent"><p class="EMStitle" style="position: absolute;top:40px ;position: relative">门禁系统</p>
        <div class="content">
            <div class="left">
                <div class="upsSd" style=" background-image: url('/manage/assert/image/xinfeng.gif');">
                    <div class="loading" id="box">

                    </div>
                </div>
                <p>开机状态 :<span class="linkSuccess"></span></p>
            </div>
            <div style="height: 300px;">
                <div class="right" style="height: 70px;margin-top: 115px">
                <table id="freshAir_table" style="border: none">
                    <tr>
                        <td style="padding-top: 50px;"><button open number="1"  style="padding: 5px 12px;border-radius: 2px;background: #4c90fb;color: #fff;border: none">开一号门</button></td>
                        <td style="padding-top: 50px;"><button open number="2" style="padding: 5px 12px;border-radius: 2px;background: #4c90fb;color: #fff;border: none">开二号门</button></td>
                    </tr>
                </table>
            </div>
            </div>
        </div>
    </div>
</div>
</div>
<script>
    $(function(){
        $(document).on("click","button[open]",function(){
            $.acooly.alert('提示', '指令已发送,请等待');
            $(this).attr("disabled","disabled");
            var number=$(this).attr("number");
            $.post('/manage/lora/entranceGuard/entranceGuard/openDoor.html', {number:number}, function(r) {
                if(r.success) {
                    $.acooly.alert('提示', '操作成功！');
                } else {
                    $.acooly.alert('错误', r.message);
                }
                $(this).removeAttr("disabled");
            }, 'json');
        })
    })
</script>